/**
 * 日程自定义提醒 orm模块映射
 *
 */
var mongoose = require('mongoose');
var	Schema = mongoose.Schema;
var constant = require("../conf/config").constant;
var period = constant.period;

var CustomRemindModel = new Schema({
    scheduleId  :   {type : String, index : true},
    memberId    :   {type : String, index : true},
    repeat      :   {type : String, default : period.NONE},
    leadMinute  :   Number,      // 提前分钟数
    alarm       :   {type : Date, index : true},       //具体执行时间
    deadline        :   {type  : Date , default : new Date(9999, 12, 12)},        // 截止时间
    lastModifyTime  :   {type : Date, default : Date.now},
    createTime  :   {type : Date, default : Date.now}
});

mongoose.model('CustomRemind', CustomRemindModel);